package com.tran.demo.exception;

import com.tran.demo.enums.ResultEnum;

public class MyException extends RuntimeException {
	
	private static final long serialVersionUID = 1L;
	
	private Integer code; 
	 
	public MyException() {}
	
	public MyException(ResultEnum resultEnum) {
		super(resultEnum.getMsg());
		this.code = resultEnum.getCode();
	}
	
	public Integer getCode() {
		return code;
	}
 
	public void setCode(Integer code) {
		this.code = code;
	}
}
